<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<title>My first Chartist Tests</title>
	<link rel="stylesheet" th:href="@{/css/chartist/chartist.min.css}">
	<script type="text/javascript" th:src="@{/ajax/libs/chartist/dist/chartist.min.js}"></script>
</head>
<body>
	<!-- Site content goes here !-->
	<div class="ct-chart ct-perfect-fourth"></div>
</body>
<script type="text/javascript">
var data = {
		  series: [5, 3, 4]
		};

		var sum = function(a, b) { return a + b };

		new Chartist.Pie('.ct-chart', data, {
		  labelInterpolationFnc: function(value) {
		    return Math.round(value / data.series.reduce(sum) * 100) + '%';
		  }
		});

</script>
</html>
